import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import eslintPlugin from '@nabla/vite-plugin-eslint'
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: { '@': path.resolve(__dirname, 'src') },
  },
  plugins: [
    vue(),
    vueJsx(),
    eslintPlugin({
      shouldLint: (path) => /\.(ts|tsx|js|jsx|vue)$/.test(path),
    }),
  ],
})
